<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<#include "head.html">
<title>添加</title>
</head>
<body>
<article class="page-container">
	<form action="${contextPath}/sys/user/save.do" method="post" class="form form-horizontal" id="form">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>用户名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.userName}" placeholder="" id="userName" name="userName">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">用户描述：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="${entity.userDesc}" placeholder="" id="" name="userDesc">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<button type="submit" class="btn btn-success radius" id="admin-role-save" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
		<input type="hidden" value="${entity.id}" name="id">
	</form>
</article>

<#include "footer.html">

<script type="text/javascript">
$(function(){
    $('.skin-minimal input').iCheck({
        checkboxClass: 'icheckbox-blue',
        radioClass: 'iradio-blue',
        increaseArea: '20%'
    })

	$("#form").validate({
		rules:{
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			var options = {  
					url:$("#form").attr("action"),
	                success: function() {
	                	layer.alert('操作成功', function(index){
	  	                	var index = parent.layer.getFrameIndex(window.name);
	  	        			parent.$("[name='refresh']").click();
	  	        			parent.layer.close(index);
	                	});    
	                	
	                }   
	        }; 
			$(form).ajaxSubmit(options);
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>